/*
 * @Author: Vorga
 * @LastEditors: Vorga
 */
#ifndef GRAPH_H
#define GRAPH_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

#include "link_queue.h"

typedef struct Graph{
    char* vertex;
    char* edge;
    size_t vexnum;
}Graph;

Graph* create_gp(char* str);

bool add_eg_gp(Graph* graph,char v1,char v2);

int get_index_gp(Graph* graph,char v);

size_t vex_in_gp(Graph* graph,char v);

size_t vex_out_gp(Graph* graph,char v);

void _dfs_gp(Graph* graph,int index,bool flags[]);
//深度优先遍历
void dfs_gp(Graph* graph);
//广度优先遍历
void bfs_gp(Graph* graph);

#endif // GRAPH_H
